package com.yaorange.nongjt.certificate.mapper;

import java.util.List;

import com.yaorange.nongjt.certificate.bo.NjtCertificateBo;
import com.yaorange.nongjt.certificate.domain.NjtCertificate;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 合格证打印数据Mapper接口
 *
 * @author coach tam
 * @date 2024-10-18
 */
public interface NjtCertificateMapper
{
    /**
     * 查询合格证打印数据
     *
     * @param id 合格证打印数据主键
     * @return 合格证打印数据
     */
    public NjtCertificate selectNjtCertificateById(Long id);

    /**
     * 查询合格证打印数据列表
     *
     * @param njtCertificate 合格证打印数据
     * @return 合格证打印数据集合
     */
    public List<NjtCertificateBo> selectNjtCertificateList(NjtCertificateBo njtCertificate);

    /**
     * 新增合格证打印数据
     *
     * @param njtCertificate 合格证打印数据
     * @return 结果
     */
    public int insertNjtCertificate(NjtCertificate njtCertificate);

    /**
     * 修改合格证打印数据
     *
     * @param njtCertificate 合格证打印数据
     * @return 结果
     */
    public int updateNjtCertificate(NjtCertificate njtCertificate);

    /**
     * 删除合格证打印数据
     *
     * @param id 合格证打印数据主键
     * @return 结果
     */
    public int deleteNjtCertificateById(Long id);

    /**
     * 批量删除合格证打印数据
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteNjtCertificateByIds(Long[] ids);

    void batchInsertNjtCertificate(@Param("list") List<NjtCertificate> njtCertificateList);

    /**
     * 保存打印数据
     *
     * @param certificate 需要更新的打印数据
     * @return 结果
     */
    Integer updateByCode(@Param("certificate") NjtCertificate certificate);

    @Select("select count(id) from njt_certificate")
    int selectTotalCount();
}
